//==========================================================================
/**
* @file	  : IShader.h
* @author : cpzhang <chengpengzhang@gmail.com>
* created : 2010-4-30   12:35
* purpose : 
*/
//==========================================================================

#ifndef __IShader_h__
#define __IShader_h__

namespace Euclid
{
	class IShader
	{
	public:
		IShader()
			: _Entry_Point("main"), _Profile("vs_3_0"), _shader(0), _error(0), _table(0),
			_vs(0), _ps(0)
		{

		}
		~IShader(){}
		virtual bool compileShaderFromFile(std::string& shaderFile, unsigned long flag) = 0;
		virtual bool createShader() = 0;
		virtual IDirect3DVertexShader9* getVertexShader()
		{
			return _vs;
		}
		virtual IDirect3DPixelShader9* getPixelShader()
		{
			return _ps;
		}
		// proteced, not private because we will inherit this class
	protected:
		std::string				_Entry_Point;
		std::string				_Profile;
		LPD3DXBUFFER			_shader;
		LPD3DXBUFFER			_error;
		LPD3DXCONSTANTTABLE		_table;
		IDirect3DDevice9*		_device;
		IDirect3DVertexShader9* _vs;
		IDirect3DPixelShader9*	_ps;
	};
}

#endif // __IShader_h__
